package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CaseFamilyMembersMapper;
import com.ruoyi.system.domain.CaseFamilyMembers;
import com.ruoyi.system.service.ICaseFamilyMembersService;
import com.ruoyi.common.core.text.Convert;

/**
 * 病例家庭成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-03
 */
@Service
public class CaseFamilyMembersServiceImpl implements ICaseFamilyMembersService 
{
    @Autowired
    private CaseFamilyMembersMapper caseFamilyMembersMapper;

    /**
     * 查询病例家庭成员
     * 
     * @param id 病例家庭成员主键
     * @return 病例家庭成员
     */
    @Override
    public CaseFamilyMembers selectCaseFamilyMembersById(Long id)
    {
        return caseFamilyMembersMapper.selectCaseFamilyMembersById(id);
    }

    /**
     * 查询病例家庭成员列表
     * 
     * @param caseFamilyMembers 病例家庭成员
     * @return 病例家庭成员
     */
    @Override
    public List<CaseFamilyMembers> selectCaseFamilyMembersList(CaseFamilyMembers caseFamilyMembers)
    {
        return caseFamilyMembersMapper.selectCaseFamilyMembersList(caseFamilyMembers);
    }

    /**
     * 新增病例家庭成员
     * 
     * @param caseFamilyMembers 病例家庭成员
     * @return 结果
     */
    @Override
    public int insertCaseFamilyMembers(CaseFamilyMembers caseFamilyMembers)
    {
        return caseFamilyMembersMapper.insertCaseFamilyMembers(caseFamilyMembers);
    }

    /**
     * 修改病例家庭成员
     * 
     * @param caseFamilyMembers 病例家庭成员
     * @return 结果
     */
    @Override
    public int updateCaseFamilyMembers(CaseFamilyMembers caseFamilyMembers)
    {
        return caseFamilyMembersMapper.updateCaseFamilyMembers(caseFamilyMembers);
    }

    /**
     * 批量删除病例家庭成员
     * 
     * @param ids 需要删除的病例家庭成员主键
     * @return 结果
     */
    @Override
    public int deleteCaseFamilyMembersByIds(String ids)
    {
        return caseFamilyMembersMapper.deleteCaseFamilyMembersByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除病例家庭成员信息
     * 
     * @param id 病例家庭成员主键
     * @return 结果
     */
    @Override
    public int deleteCaseFamilyMembersById(Long id)
    {
        return caseFamilyMembersMapper.deleteCaseFamilyMembersById(id);
    }
}
